/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package mx.itschapala.dsw2.RegistroES.modelo;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Ricky
 */
@Entity
@Table(name = "register1t")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Register1t.findAll", query = "SELECT r FROM Register1t r"),
    @NamedQuery(name = "Register1t.findByIdRegisterT", query = "SELECT r FROM Register1t r WHERE r.idRegisterT = :idRegisterT"),
    @NamedQuery(name = "Register1t.findByIncomeHR", query = "SELECT r FROM Register1t r WHERE r.incomeHR = :incomeHR"),
    @NamedQuery(name = "Register1t.findByIncomeDR", query = "SELECT r FROM Register1t r WHERE r.incomeDR = :incomeDR"),
    @NamedQuery(name = "Register1t.findByIncomeMR", query = "SELECT r FROM Register1t r WHERE r.incomeMR = :incomeMR"),
    @NamedQuery(name = "Register1t.findByIncomeYR", query = "SELECT r FROM Register1t r WHERE r.incomeYR = :incomeYR")})
public class Register1t implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "idRegisterT")
    private Integer idRegisterT;
    @Basic(optional = false)
    @NotNull
    @Column(name = "IncomeHR")
    @Temporal(TemporalType.TIMESTAMP)
    private Date incomeHR;
    @Basic(optional = false)
    @NotNull
    @Column(name = "IncomeDR")
    @Temporal(TemporalType.TIMESTAMP)
    private Date incomeDR;
    @Basic(optional = false)
    @NotNull
    @Column(name = "IncomeMR")
    @Temporal(TemporalType.TIMESTAMP)
    private Date incomeMR;
    @Basic(optional = false)
    @NotNull
    @Column(name = "IncomeYR")
    @Temporal(TemporalType.TIMESTAMP)
    private Date incomeYR;
    @JoinColumn(name = "idEmployee", referencedColumnName = "idEmployeeT")
    @ManyToOne(optional = false)
    private Employeet idEmployee;

    public Register1t() {
    }

    public Register1t(Integer idRegisterT) {
        this.idRegisterT = idRegisterT;
    }

    public Register1t(Integer idRegisterT, Date incomeHR, Date incomeDR, Date incomeMR, Date incomeYR) {
        this.idRegisterT = idRegisterT;
        this.incomeHR = incomeHR;
        this.incomeDR = incomeDR;
        this.incomeMR = incomeMR;
        this.incomeYR = incomeYR;
    }

    public Integer getIdRegisterT() {
        return idRegisterT;
    }

    public void setIdRegisterT(Integer idRegisterT) {
        this.idRegisterT = idRegisterT;
    }

    public Date getIncomeHR() {
        return incomeHR;
    }

    public void setIncomeHR(Date incomeHR) {
        this.incomeHR = incomeHR;
    }

    public Date getIncomeDR() {
        return incomeDR;
    }

    public void setIncomeDR(Date incomeDR) {
        this.incomeDR = incomeDR;
    }

    public Date getIncomeMR() {
        return incomeMR;
    }

    public void setIncomeMR(Date incomeMR) {
        this.incomeMR = incomeMR;
    }

    public Date getIncomeYR() {
        return incomeYR;
    }

    public void setIncomeYR(Date incomeYR) {
        this.incomeYR = incomeYR;
    }

    public Employeet getIdEmployee() {
        return idEmployee;
    }

    public void setIdEmployee(Employeet idEmployee) {
        this.idEmployee = idEmployee;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idRegisterT != null ? idRegisterT.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Register1t)) {
            return false;
        }
        Register1t other = (Register1t) object;
        if ((this.idRegisterT == null && other.idRegisterT != null) || (this.idRegisterT != null && !this.idRegisterT.equals(other.idRegisterT))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "mx.itschapala.dsw2.RegistroES.modelo.Register1t[ idRegisterT=" + idRegisterT + " ]";
    }
    
}
